package golf;

import java.sql.ResultSet;
import java.sql.SQLException;

public class Hole {

	public Hole(){}
	/*
	 * HOLESEQNO	NUMBER(38,0)
CRSNO	NUMBER(38,0)
HOLEDISTANCE	NUMBER(38,0)
HOLEFIXEDSTROKENO	NUMBER(38,0)
HOLEDIFFICD	CHAR(5 BYTE)
HOLEDIFFICDCLASSIFY	CHAR(5 BYTE)
=>CODE와 조인해서 DIFFICULTY 문자열 컬럼 1개 생성
	 */
	public Hole(ResultSet rs){
		try {
			setNo( rs.getInt("HOLESEQNO") );
			setCourse_no( rs.getInt("CRSNO") );
			setDistance( rs.getInt("HOLEDISTANCE") );
			setFixed_stroke_no( rs.getInt("HOLEFIXEDSTROKENO") );
			setDifficulty( rs.getString("DIFFICULTY") );
		
			//System.out.println("Hole() 완료");
		} catch (SQLException e) {
			System.out.println("Hole() 실패");
			e.printStackTrace();
		}
	}
	int no;
	int course_no;
	int distance;
	int fixed_stroke_no;
	String difficulty;
	public int getNo() {
		return no;
	}
	public void setNo(int no) {
		this.no = no;
	}
	public int getCourse_no() {
		return course_no;
	}
	public void setCourse_no(int course_no) {
		this.course_no = course_no;
	}
	public int getDistance() {
		return distance;
	}
	public void setDistance(int distance) {
		this.distance = distance;
	}
	public int getFixed_stroke_no() {
		return fixed_stroke_no;
	}
	public void setFixed_stroke_no(int fixed_stroke_no) {
		this.fixed_stroke_no = fixed_stroke_no;
	}
	public String getDifficulty() {
		return difficulty;
	}
	public void setDifficulty(String difficulty) {
		this.difficulty = difficulty;
	}
	
}
